package com.amos.core;

import com.amos.util.StringUtils;
import lombok.Data;

import java.util.Date;

/**
 * Copyright © 2018 嘉源锐信. All rights reserved.
 *
 * @Project: mu-exam
 * @ClassName: BaseDTO
 * @Package: com.amos.core
 * @author: zhuqb
 * @Description: 基类DTO
 * @date: 2020/3/4 0004 下午 17:10
 * @Version: V1.0
 */
@Data
public class BaseDTO {
    /**
     * id
     */
    private String id;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 修改时间
     */
    private Date modifyTime;
    /**
     * 是否标记删除
     */
    private Boolean delFlag;

    /**
     * 是否是新增
     *
     * @return
     */
    public boolean isNew() {
        return StringUtils.isNullOrEmpty(this.getId());
    }
}
